home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
20 Music & Utilities
/
SCI242.TXT
< prev
next >
Wrap
Text File
|
2019-04-13
|
1KB
|
60 lines
PROGRAMMING ASSEMBLY CODES
for the
SEQUENTIAL 242 MIDI INTERFACE
1. To initialize the ACIA for MIDI:
LDA #$03 ;Master reset
STA $DE00
LDA #$15 ;Setup for 1 start bit +
8 bits + 1 stop bit
STA $DE00 ; and 31.25k Baud
2. To send MIDI OUT:
LOOP
LDA $DE02 ;Read ACIA status reg.
AND #$02 ;Check transmit empty
flag
BEQ LOOP ;Loop until empty
LDA MIDIBYTE ;Load in byte to send
STA $DE01 ;Send MIDI OUT
3. To receive MIDI IN:
LOOP
LDA $DE02 ;Read ACIA status reg.
LSR ;Check receive full flag
BCC LOOP ;Loop until ready
LDA $DE03 ;Read MIDI IN
4. To initialize the PIA:
LDA MODE ;Use control registers
to set up
STA $DF01 ; operating mode.
STA $DF03 ;Obtain mode from Table 1
5. To read drum clock input:
LDA $DF01 ;Read control register
BPL EXIT ;Branch if no drum clock
;Falls thru if inter-
rupted by drum clock
LDA $DF00 ;Clear interrupt flag bit
6. To read footswitch input:
LDA $DF03 ;Read control register
BPL